<?php
namespace User\Model;

use Think\Model;

class ActivityRegisterModel extends Model
{
    CONST STATUS_ACTIVE = 1;//正常、已发布--
    CONST STATUS_PENDING = 2;//--待审核--
    CONST STATUS_DELETE = 9;//已删除--

    public static function get_status($status = 'all')
    {
        $label = [
            self::STATUS_ACTIVE => "正常",
            self::STATUS_PENDING => "待审核",
            self::STATUS_DELETE => "已删除",
        ];
        if ($status === 'all') {
            return $label;
        }
        if (array_key_exists($status, $label)) {
            return $label[$status];
        }
        return "未知";
    }

    CONST CARD_TYPE_ID = 0;//身份证--
    CONST CARD_TYPE_PASSPORT = 1;//护照--
    public static function get_card_type($type = 'all')
    {
        $label = [
            self::CARD_TYPE_ID => "身份证",
            self::CARD_TYPE_PASSPORT => "护照"
        ];
        if ($type === 'all') {
            return $label;
        }
        if (array_key_exists($type, $label)) {
            return $label[$type];
        }
        return "未知";
    }

    CONST INDUSTRY_OTHER = 0;//其他--
    CONST INDUSTRY_INFO = 1;//信息产业--
    CONST INDUSTRY_FASHION = 2;//时尚产业--
    CONST INDUSTRY_ENV = 3;//环保产业--
    CONST INDUSTRY_FIN = 4;//金融产业--
    CONST INDUSTRY_HEALTH = 5;//健康产业--
    CONST INDUSTRY_TOUR = 6;//旅游产业--
    CONST INDUSTRY_FAC = 7;//高端装备制造产业--
    CONST INDUSTRY_CULTURE = 8;//--文化产业--
    public static $label = [
        self::INDUSTRY_OTHER => "其他",
        self::INDUSTRY_INFO => "信息产业",
        self::INDUSTRY_FASHION => "时尚产业",
        self::INDUSTRY_ENV => "环保产业",
        self::INDUSTRY_FIN => "金融产业",
        self::INDUSTRY_HEALTH => "健康产业",
        self::INDUSTRY_TOUR => "旅游产业",
        self::INDUSTRY_FAC => "高端装备制造产业",
        self::INDUSTRY_CULTURE => "文化产业"
    ];
    public static function get_industry($industry = 'all', $project = 0)
    {
        $label_industry = '';
        if($project == 0){
            $label_industry = self::$label;
        }
        if($project == 1){
            $label_industry = self::$label_jl;
        }
        if ($industry === 'all') {
            return $label_industry;
        }
        if (array_key_exists($industry, $label_industry)) {
            return $label_industry[$industry];
        }
        return "未知";
    }

    //--吉林项目--
    CONST JL_INFO = 1;
    CONST JL_BIOLOGY =2;
    CONST JL_CAR = 3;
    CONST JL_TOUR = 4;
    CONST JL_WINCHANCE = 5;
    CONST JL_DEEP = 6;
    CONST JL_OTHER = 0;
    public static $label_jl = [
        self::JL_OTHER => "其他",
        self::JL_INFO => "信息产业",
        self::JL_BIOLOGY => "生物科技",
        self::JL_CAR => "汽车制造",
        self::JL_TOUR => "旅游产业",
        self::JL_WINCHANCE => "文创产业",
        self::JL_DEEP => "食品深加工"
    ];

}

?>